package com.itheima.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;


/*
* 开启AR
*
* 菜品及套餐分类表对应的实体类
* */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Category extends Model<Category> implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId
    private Long id;

    //类型:1.菜品分类 2.套餐分类
    private Integer type;

    //分类名称
    private String name;

    //顺序
    private Integer sort;

    //创建时间
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    //更新时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    //创建人
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;

    //更新人
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;
}
